Art related to an automatic gain control apparatus that sets a gain coefficient automatically according to the received level of a signal and outputs the signal at a constant level is disclosed in Patent Document 1. The conventional apparatus disclosed in this document enables the gain coefficient to be calculated with high trackability of changes in the received level by employing a function that alters the number of samples used to calculate the gain coefficient according to the received level.
The operation of the above conventional apparatus will be briefly described below with reference to FIGS. 2 and 3. FIG. 2 is a block diagram showing the structure of the conventional automatic gain control apparatus; FIG. 3 is a flowchart illustrating the basic operation of the conventional automatic gain control apparatus.
As shown in FIG. 2, the conventional automatic gain control apparatus 100 comprises a mean square circuit 1, a memory 2, a gain coefficient generating circuit 3, a multiplier 4, a decision circuit 5, a control circuit 6, and a table ROM 7.
The automatic gain control apparatus 100 processes a received signal as an input signal x(t) (step S1); a gain coefficient Ag is applied to the input signal x(t) (step S2); and an amplified z(t) (=Ag×{x(t)}) is output from the multiplier 4 as the output signal (step S3).
The output signal z(t) from the multiplier 4 is simultaneously input to a feedback loop (it is input to the mean square circuit 1).
In the mean square circuit 1, the output signal z(t) from the multiplier 4 is squared one sample at a time, a sample being the processing unit (step S4), and the calculated results are stored in the memory 2. The processes in steps S2 and S4 are repeated n times until the sample count unit n is reached (steps S5 and S6), after which the mean square circuit 1 calculates the mean square value Ave(j) (step S7) and records the mean square value Ave(j) in the memory 2 (step S8).
The operations in steps S2 and S4-S7 are repeated N times (step S9), and the gain coefficient generating circuit 3 calculates the mean value Vr of the N mean square values Ave(j) (step S10). The gain coefficient Ag is obtained by dividing a preset reference level Lv by the mean value Vr thus obtained (step S11), and the gain coefficient is altered to this value.
Simultaneously with the calculation of the gain coefficient, the decision circuit 5 monitors changes in the level (step S12), and if there is a change of a predetermined magnitude, the control circuit 6 performs control to change the number N of mean square values needed to obtain the gain coefficient or the interval at which the gain coefficient is altered (step S13). The control circuit 6 makes these changes on the basis of information stored in the table ROM 7, to which the control circuit 6 refers.
As described above, the conventional automatic gain control apparatus 100 alters the gain coefficient and performs gain control according to changes in the received level of the signal.    Patent Document 1: Japanese Patent Application Publication No. 2003-283278